#{extends 'main.html' /}
#{set title:'MyNewEv' /}

#{if user}
<div id='cssmenu'>
<ul>
   <li><a href='/home'><span>Home</span></a></li>
   <li class='active'><a href='/category'><span>Create event</span></a></li>
   <li><a href='/myevents'><span>My events</span></a></li>
   <li><a href='/registeredevents'><span>Registered events</span></a></li>
</ul>
</div>
#{/if}
		<br/>
		<center>
		<nav-header>
			<a href="/trips"> Trips </a>
			<a href="/sports"> Sport </a>
			<a href="/culture"> Culture </a>
			<a href="/entertainment"> Entertainment </a>
			<a href="/night_life"> Night life </a>
			<a href="/learning"> Learning </a>
		</nav-header>
		</center>
		<div class="container">
			<!--<div id="adds">adds
			</div>-->

	<h2>Create your event:</h2>
	#{if flash.error}
  	  	<p style="color:#c00">
   	     ${flash.error}
   	 	</p>
		#{/if}
		
	<h4>Category: ${category}</h4>	
	
	#{form @EventManager.addEvent(category)}
		<div class="floatingform">
		<span>
			<label for "title">title:</label>
			<input type="text" name="title" id="title" value="${flash.title}" maxlength="30">
			<span class="error" style="color:#c00">#{error 'title' /}</span>
		</span>
		<span>
			<label for "date">Date:</label>
			<input type="text" class="date" name="date" value="${flash.date}">
			<span class="error" style="color:#c00">#{error 'date' /}</span>
		</span>
		<span>
			<label for "location">location:</label>
			<input type="text" name="location" id="location" value="${flash.location}">
			<span class="error" style="color:#c00">#{error 'location' /}</span>
			<br/>
		</span>
		<span>
			<label for "description">description:</label>
			<textarea type="text" name="description" id="description" rows="5" cols="50">${flash.description}</textarea> 
			<span class="error" style="color:#c00">#{error 'description' /}</span>
			<br/>
		</span>
		
		<span>
			<input type="submit" id="signin" value="add event">
		</span>
		</div>
	#{/form}
	
	<div class="floatingform">
		<div class=${category.toString().toLowerCase()}>
			<div class="photo"></div>
		</div>
	</div>
	
</div>